using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class SOXUCDAUModel : ObjModel<SOXUCDAU>, IModelConverter
	{

		#region Constructor

		public SOXUCDAUModel()
			: base()
		{
		}

		public SOXUCDAUModel(SOXUCDAU obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _maxucdau;

		private System.Guid? _magiaodan;

		private System.Guid? _malinhmuc;

		private System.Int32? _ngay;

		private System.Int32? _thang;

		private System.Int32? _nam;

		private System.String _tenlinhmuc;

		private System.String _ghichu;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAXUCDAU
		{
			get
			{
				return _maxucdau;
			}
			set
			{
				_maxucdau = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN
		{
			get
			{
				return _magiaodan;
			}
			set
			{
				_magiaodan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MALINHMUC
		{
			get
			{
				return _malinhmuc;
			}
			set
			{
				_malinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NGAY
		{
			get
			{
				return _ngay;
			}
			set
			{
				_ngay = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? THANG
		{
			get
			{
				return _thang;
			}
			set
			{
				_thang = value;
			}
		}

		//[Store]
        [Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NAM
		{
			get
			{
				return _nam;
			}
			set
			{
				_nam = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENLINHMUC
		{
			get
			{
				return _tenlinhmuc;
			}
			set
			{
				_tenlinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(2000, ErrorMessage= "Value must be under 2000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String GHICHU
		{
			get
			{
				return _ghichu;
			}
			set
			{
				_ghichu = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(SOXUCDAUModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<SOXUCDAU>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override SOXUCDAU ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator SOXUCDAUModel(SOXUCDAU obj)
		{
			return new SOXUCDAUModel(obj);
		}
		public static implicit operator SOXUCDAU(SOXUCDAUModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
